{% extends "base.html" %}
{% block title %}高级搜索{% endblock %}
{% block head %}
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
  <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
{% endblock %}
{% block content %}
<form method="get" action="/advanced_search" role="form" class="form-horizontal">

    <div class="form-group">
        <label for="allKey" class="col-md-4 control-label">包含全部关键词</label>
        <div class="col-md-8">
            <input type="text" class="form-control" id="allKey" name="allKey">
        </div>
    </div>

    <div class="form-group">
        <label for="anyKey" class="col-md-4 control-label">包含任意关键词</label>
        <div class="col-md-8">
            <input type="text" class="form-control" id="anyKey" name="anyKey">
        </div>
    </div>

    <div class="form-group">
        <label for="exceptKey" class="col-md-4 control-label">不包含的关键词</label>
        <div class="col-md-8">
            <input type="text" class="form-control" id="exceptKey" name="exceptKey">
        </div>
    </div>



    <div class="form-group">
        <label for="startDate" class="col-md-4 control-label">搜索开始时间</label>
        <div class="col-md-8">
            <input type="date" class="form-control" id="startDate" name="startDate">
        </div>
    </div>

    <div class="form-group">
        <label for="endDate" class="col-md-4 control-label">搜索结束时间</label>
        <div class="col-md-8">
            <input type="date" class="form-control" id="endDate" name="endDate">
        </div>
    </div>

    <div class="form-group">
        <!--文章来源  website:网站,news:报纸,weibo:微博,weixin：微信,webbbs：论坛,webapp：app, 默认:""-->
        <label class="col-md-4 control-label">文章来源</label>
        <div class="col-md-8">
            <label class="radion-inline">
                <input type="radio" class="form-control" id="selType1" name="selType" value="" checked> 全部
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="selType2" name="selType" value="website"> 网站
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="selType3" name="selType" value="news"> 报纸
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="selType4" name="selType" value="weibo"> 微博
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="selType5" name="selType" value="webbbs"> 论坛
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="selType6" name="selType" value="webapp"> app
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="selType7" name="selType" value="weixin"> 微信
            </label>

        </div>
    </div>

    <div class="form-group">
        <label class="col-md-4 control-label">文章情感</label>
        <div class="col-md-8">
            <label class="radion-inline">
                <input type="radio" class="form-control" id="emotion1" name="emotion" value="-1" checked> 全部
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="emotion2" name="emotion" value="1"> 负面
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="emotion3" name="emotion" value="51"> 正面
            </label>
        </div>
    </div>

    <div class="form-group">
        <label class="col-md-4 control-label">关键词匹配地方</label>
        <div class="col-md-8">
            <label class="radion-inline">
                <input type="radio" class="form-control" id="searchRange1" name="searchRange" value="1" checked> 全文
            </label>
            <label class="radion-inline">
                <input type="radio" class="form-control" id="searchRange2" name="searchRange" value="2"> 标题
            </label>
        </div>
    </div>

    <div class="form-group">
        <label for="limit" class="col-md-4 control-label">返回文章数量</label>
        <div class="col-md-8">
            <input type="number" class="form-control" id="limit" name="limit" value="20">
        </div>
    </div>


    <div class="form-group">
        <label for="start" class="col-md-4 control-label">文章开始编号</label>
        <div class="col-md-8">
            <input type="number" class="form-control" id="start" name="start" value="0">
        </div>
    </div>


    <div class="form-group"><input type="submit" class="btn btn-primary" /></div>



</form>

{% endblock %}

{% block script %}

<script>

$(document).ready(function(){
    var ddd = new Date();
    var day =ddd.getDate();
    if(ddd.getMonth()<10){
       var month = "0"+(ddd.getMonth()+1); 
    }
    if(ddd.getDate()<10){
         day = "0"+ddd.getDate(); 
    }
    var datew = ddd.getFullYear()+"-"+month+"-"+day;
    var datew = datew.toString();
    $("#startDate").val(datew);
    $("#endDate").val(datew);
})

</script>
{% endblock %}